<!DOCTYPE html>
<html>
<head>
<%include("../../tpl/head.html"){}%>
<title>后台管理-账户管理</title>
</head>
<body class="hold-transition fixed skin-blue sidebar-mini">
	<div class="wrapper">
		<!-- 头部 -->
		<%include("../../tpl/header.html"){}%>
		<!-- 网页正文 -->
		<div class="content-wrapper">
			<!-- 网页正文-面包屑 -->
			<section class="content-header">
				<h1>${_type!'添加'}用户</h1>
				<ol class="breadcrumb">
					<li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
					<li><a href="#">系统管理</a></li>
					<li><a href="index.jspx">用户管理</a></li>
					<li class="active">${_type!'添加'}用户</li>
				</ol>
			</section>
			<!-- 网页正文-主体 -->
			<section class="content">
				<div class="row">
					<div class="col-md-12">
						<div class="box box-info">
							<div class="box-header with-border">
								<h3 class="box-title"></h3>
							</div>
							<form class="form-horizontal" action="save.json?oper=${_oper!'add'}">
								<div class="box-body">
									<div class="form-group">
										<label class="col-lg-2 col-md-3 col-sm-4 control-label">用户名</label>
										<div class="col-lg-6 col-md-7 col-sm-8">
											<input type="text" class="form-control" name="name" placeholder="请输入用户名" value="${record.name!}" required>
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-2 col-md-3 col-sm-4 control-label">用户帐号</label>
										<div class="col-lg-6 col-md-7 col-sm-8">
											<input type="text" class="form-control" name="account" placeholder="请输入用户帐号" value="${record.account!}" required>
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-2 col-md-3 col-sm-4 control-label">用户角色</label>
										<div class="col-lg-6 col-md-7 col-sm-8">
											<select class="form-control" name="roleId">
												<!-- <% for(item in _roles!){ %> -->
												<option value="${item.id!}" ${item.id==record.roleId!0?'selected':''}>${item.name!}</option>
												<!-- <% } %> -->
											</select>
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-2 col-md-3 col-sm-4 control-label">用户密码</label>
										<div class="col-lg-6 col-md-7 col-sm-8">
											<input type="password" class="form-control" name="password" placeholder="请输入用户密码,默认为123456">
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-2 col-md-3 col-sm-4 control-label">用户联系方式</label>
										<div class="col-lg-6 col-md-7 col-sm-8">
											<input type="text" class="form-control" name="phone" value="${record.phone!}" placeholder="请输入用户联系方式">
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-2 col-md-3 col-sm-4 control-label">联系QQ</label>
										<div class="col-lg-6 col-md-7 col-sm-8">
											<input type="text" class="form-control" name="qq" value="${record.qq!}" placeholder="请输入联系QQ">
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-2 col-md-3 col-sm-4 control-label">联系邮箱</label>
										<div class="col-lg-6 col-md-7 col-sm-8">
											<input type="text" class="form-control" name="email" value="${record.email!}" placeholder="请输入联系邮箱">
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-2 col-md-3 col-sm-4 control-label">图片</label>
										<div class="col-lg-6 col-md-7 col-sm-8 upload" data-extensions="jpg,png" data-compress="true" id="image-upload">
											<input type="hidden" name="picture" data-value value="">
											<div class="picker">选择图片</div>
											<div id="fileList" class="upload"></div>
										</div>
									</div>
								</div>
								<!-- /.box-body -->
								<div class="box-footer">
									<div class="row">
										<div class="col-lg-6 col-md-7 col-sm-8 col-lg-offset-2 col-md-offset-3 col-sm-offset-4">
											<a href="index.jspx" class="btn btn-default">返回</a>
											<button type="submit" class="btn btn-info pull-right">提交</button>
										</div>
									</div>
								</div>
								<!-- /.box-footer -->
							</form>
						</div>
					</div>
				</div>
			</section>
			<!-- /.content -->
		</div>
		<!-- 网页底部 -->
		<%include("../../tpl/footer.html"){}%>
	</div>
	<%include("../../tpl/script.html"){}%>
	<script type="text/javascript">
		$(document).ready(function() {
			$("form").on('submit-success', function(e, result) {
				layer.msg("提交成功", {
					icon : 1,
					time : 1500
				});
			}).validate();
		});
	</script>
</body>
</html>
